package com.shenghuai.bclient.stores.util

import android.view.View
import android.view.ViewGroup
import android.view.Window
import androidx.appcompat.app.AppCompatActivity

object ActivityEt {

    fun AppCompatActivity.getLayoutRootView(): View {
        return findLayoutRootView(this)
    }

    @JvmStatic
    fun findLayoutRootView(act: AppCompatActivity): View {
        val rootView = act.findViewById<ViewGroup>(Window.ID_ANDROID_CONTENT)
        return rootView.getChildAt(0)
    }

}